package com.joe.xl.devcommon1.util.result;

/**
 * @Author joexl <joe_xuli@163.com>
 * @Since 1.0
 * @Date 2020/11/10
 */
public enum EnumStatus {
    SUCCESS(1, "success"),
    FAIL(-1, "fail"),

    PARAM_NULL(1001, "parameter is null"),

    GLOBAL_EXCEPTION(1002, "global exception"),
    SERVER_ERROR(1003, "server error")
    ;

    private Integer code;
    private String msg;

    EnumStatus(){
        this(1, "success");
    }

    EnumStatus(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
